<?php
$section = "booking";
$titre = _LB_BOOKING_THANKS;
$link = $section;
Session::setBackLink($link); 
$code = Request::get("code");
$id = base64_decode(urldecode($code));
$booking = new Booking();
if($id <=0 || !$booking->get($id)){
	redirect(APPLICATION_URL_FO."/");
}
$page = new Static_Page();
$page->query("SELECT * FROM STATIC_PAGE WHERE CODE = 'booking_completed'");
$page->fetch();
$bookingData = Booking_detail::getbookingDetail($id);
//create cfer
$cfer = new Cfer(array(
	_LB_HOME =>  APPLICATION_URL_FO."/",
    _LB_BOOKING => APPLICATION_URL_FO."/booking/",
	_LB_BOOKING_THANKS => APPLICATION_URL_FO."/booking/thanks/?id=".$id
));

Session::setBackCfer($link, $cfer->getCferArray());
$smarty->assign('cfer', $cfer);
$smarty->assign('booking', $booking);
$smarty->assign('bookingData', $bookingData[$id]);
$smarty->assign('page', $page);
$smarty->assign('titre', $titre);
$smarty->display("booking_thanks.html");
?>
